package com.ruoyi.zhike.system.service.impl;

import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.ruoyi.zhike.db.mapper.ApplicationInfoMapper;
import com.ruoyi.zhike.db.domain.ApplicationInfo;
import com.ruoyi.zhike.system.service.IApplicationInfoService;

import javax.annotation.Resource;

/**
 * 应用包管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-17
 */
@Service
public class ApplicationInfoServiceImpl implements IApplicationInfoService 
{
    @Resource
    private ApplicationInfoMapper applicationInfoMapper;

    /**
     * 查询应用包管理
     * 
     * @param id 应用包管理主键
     * @return 应用包管理
     */
    @Override
    public ApplicationInfo selectApplicationInfoById(Long id)
    {
        return applicationInfoMapper.selectApplicationInfoById(id);
    }

    /**
     * 查询应用包管理列表
     * 
     * @param applicationInfo 应用包管理
     * @return 应用包管理
     */
    @Override
    public List<ApplicationInfo> selectApplicationInfoList(ApplicationInfo applicationInfo)
    {
        return applicationInfoMapper.selectApplicationInfoList(applicationInfo);
    }

    /**
     * 查询应用包管理列表
     *
     * @param applicationInfo 应用包管理
     * @return 应用包管理
     */
    @Override
    public List<Map<String, Object>> selectApplicationInfoListMap(ApplicationInfo applicationInfo)
    {
        return applicationInfoMapper.selectApplicationInfoListMap(applicationInfo);
    }

    /**
     * 新增应用包管理
     * 
     * @param applicationInfo 应用包管理
     * @return 结果
     */
    @Override
    public int insertApplicationInfo(ApplicationInfo applicationInfo)
    {
        applicationInfo.setCreateTime(DateUtils.getNowDate());
        return applicationInfoMapper.insertApplicationInfo(applicationInfo);
    }

    /**
     * 修改应用包管理
     * 
     * @param applicationInfo 应用包管理
     * @return 结果
     */
    @Override
    public int updateApplicationInfo(ApplicationInfo applicationInfo)
    {
        applicationInfo.setUpdateTime(DateUtils.getNowDate());
        return applicationInfoMapper.updateApplicationInfo(applicationInfo);
    }

    /**
     * 批量删除应用包管理
     * 
     * @param ids 需要删除的应用包管理主键
     * @return 结果
     */
    @Override
    public int deleteApplicationInfoByIds(Long[] ids)
    {
        return applicationInfoMapper.deleteApplicationInfoByIds(ids);
    }

    /**
     * 删除应用包管理信息
     * 
     * @param id 应用包管理主键
     * @return 结果
     */
    @Override
    public int deleteApplicationInfoById(Long id)
    {
        return applicationInfoMapper.deleteApplicationInfoById(id);
    }
}
